import { _decorator } from 'cc';

export class UserData {
    public onLoad() {
    }
    nickName: string = '玩家';
    age: number = 0;
    level: number = 0;
    gold:number = 0;
    gem: number = 0;
    mhp: number = 999;
    atk: number = 0;


    private static _instance: UserData = null
    public static getInstance(): UserData{
        if(!this._instance){
        this._instance = new UserData();
        }
        return this._instance;
    }
}

export let userData = UserData.getInstance();